﻿@model Orchard.Core.Common.ViewModels.TextFieldSettingsEventsViewModel

<fieldset>
    <div>
        <label for="@Html.FieldIdFor(m => m.Settings.Flavor)" class="forcheckbox">@T("Display options")</label>  
        @Html.EditorFor(m => m.Settings.Flavor)
        @Html.ValidationMessageFor(m => m.Settings.Flavor)
    </div>
</fieldset>
<fieldset>
    <label for="@Html.FieldIdFor(m => m.Settings.MaxLength)">@T("Maximum length")</label>
    @Html.EditorFor(m => m.Settings.MaxLength, new { htmlAttributes = new { min = 0 } })
    <span class="hint">@T("Maximum length allowed for this field. Setting the value to 0 means unlimited length.")</span>
    @Html.ValidationMessageFor(m => m.Settings.MaxLength)
</fieldset>
<fieldset>
    <div>
        @Html.CheckBoxFor(m => m.Settings.Required) <label for="@Html.FieldIdFor(m => m.Settings.Required)" class="forcheckbox">@T("Required")</label>
        <span class="hint">@T("Check to ensure the user enters a value in this field.")</span>
    </div>
</fieldset>
<fieldset>
    <label for="@Html.FieldIdFor(m => m.Settings.Hint)">@T("Help text")</label>
    @Html.TextAreaFor(m => m.Settings.Hint, new { @class = "text medium", rows = "5" })
    <span class="hint">@T("The help text is written under the field when authors are editing the content item.")</span>
    @Html.ValidationMessageFor(m => m.Settings.Hint)
</fieldset>
<fieldset>
    <div class="editor-field">
        <label for="@Html.FieldIdFor(m => m.Settings.Placeholder)">@T("Watermark (placeholder)")</label>
        @Html.TextBoxFor(m => m.Settings.Placeholder, new { @class = "text large" })
        @Html.ValidationMessageFor(m => m.Settings.Placeholder)
        <span class="hint">@T("A hint to display when the input of text is empty. (optional)")</span>
    </div>
</fieldset>
<fieldset>
    @Display.DefinitionTemplate(TemplateName: "TextFieldDefaultValueEditor", Model: Model)
</fieldset>
